import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listExam(query) {
  return request({
    url: '/coffee/management/exam/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getExam(id) {
  return request({
    url: '/coffee/management/exam/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addExam(data) {
  return request({
    url: '/coffee/management/exam',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateExam(data) {
  return request({
    url: '/coffee/management/exam',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delExam(id) {
  return request({
    url: '/coffee/management/exam/' + id,
    method: 'delete'
  })
}

export function listLibList() {
  return request({
    url: '/coffee/management/lib/list',
    method: 'post',
    data:{}
  })
}


export function genScore(id) {
  return request({
    url: '/coffee/exam/paperTotalSCore',
    method: 'post',
    data:{
      examId: id
    }
  })
}

export function exportScoreFile(id) {
  return request({
    url: '/coffee/management/exam/exportExamInfo',
    method: 'post',
    data:{
      id: id
    }
  })
}
export function updatePassword(id) {
  return request({
    url: '/coffee/exam/updateStudentPassword',
    method: 'post',
    data:{
      examId: id
    }
  })
}
